<?php
require_once 'conta.class.php';
$conta = new Conta();

/**
 *
 * <?php
$prStr = '';
if (!isset($_POST['RID'])) {
    $_POST['RID'] = $OBJCTRC;
}
if ($_POST['ORP'] == 1) {
    if (isset($_POST['AID']) && $_POST['AID'] > 0) {
    $prStr .= rt_field('button', 'ED', 'Null_Ac', 'Escolher Outra Conta', '', '', '', 'SUBMIT" onclick="
		document.ReceiverProperties.AID.value=\'\';
		document.ReceiverProperties.action=\'_response/call.php?get=Operative/elem_mp\';
		subform(\'ReceiverProperties\',\'inv_MP\');
		document.getElementById(\'OrderProp\').innerHTML=\'\';');
    }
    $prStr .= rt_field('button', 'ED', 'FMAC', 'Nova Conta', '100', '38', '', 'SUBMIT" onClick="
		document.ReceiverProperties.AID.value=\'\';
		document.ReceiverProperties.action=\'_response/call.php?get=Operative/view/viewreceiveraccount\';
		subform(\'ReceiverProperties\',\'NWAC\');');
    if ($_POST['AccViewMode'] == 0) {
        $prStr .= rt_field('button', 'ED', 'FMAC', 'Ver Bloqueados', '100', '38', '', 'SUBMIT" onClick="
		document.ReceiverProperties.AID.value=\'\';
		document.ReceiverProperties.AccViewMode.value=1;
		document.ReceiverProperties.action=\'_response/call.php?get=Operative/elem_mp\';
		document.getElementById(\'OrderProp\').innerHTML=\'\';
		subform(\'ReceiverProperties\',\'inv_MP\');
		document.ReceiverProperties.action=\'_response/call.php?get=Operative/receiveraccount\';
		subform(\'ReceiverProperties\',\'AC_List\');');
    } else {
        $prStr .= rt_field('button', 'ED', 'FMAC', 'Esconder Bloqueados', '100', '38', '', 'SUBMIT" onClick="
		document.ReceiverProperties.AID.value=\'\';
		document.ReceiverProperties.AccViewMode.value=0;
		document.ReceiverProperties.action=\'_response/call.php?get=Operative/elem_mp\';
		document.getElementById(\'OrderProp\').innerHTML=\'\';
		subform(\'ReceiverProperties\',\'inv_MP\');
		document.ReceiverProperties.action=\'_response/call.php?get=Operative/receiveraccount\';
		subform(\'ReceiverProperties\',\'AC_List\');');
    }
    $prJs = 'document.ReceiverProperties.action=\'_response/call.php?get=Operative/receiveraccount\';
		subform(\'ReceiverProperties\',\'AC_List\');';
} elseif ($_POST['ORP'] == 2) {
    $prJs = 'document.ReceiverProperties.action=\'_response/call.php?get=Operative/list_corragencies\';
		subform(\'ReceiverProperties\',\'AC_List\');';
} else {
    $prJs = 'document.getElementById(\'AC_List\').innerHTML=\'\';';
}
?>
<script charset="utf-8" type="text/javascript"><?php echo $prJs;?></script>
<div style="float:left"><?php echo $prStr; ?></div>
<div style="float:right;clear:both">
    <?php
    if ($_POST['CST'] == 0) {
        mn_field('select', 'ED', 'ORP', $_POST['ORP'], "SELECT mp_ID AS ID, mp_ModoPago AS NAME FROM hd_modospago WHERE mp_Flag = 1", '', '', '" onchange="
		document.getElementById(\'OrderProp\').innerHTML=\'\';
		document.getElementById(\'NWAC\').innerHTML=\'\';
		document.ReceiverProperties.action=\'_response/call.php?get=Operative/elem_mp\';
		subform(\'ReceiverProperties\',\'inv_MP\');');
    }
    ?>
</div>
 */